package com.lcpress.entity;

import java.io.Serializable;
import java.util.Date;

import org.springframework.beans.factory.annotation.Value;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;

//(lcpress_users)
@Data
@TableName(value = "lcpress_users")
public class User implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 5729159671478206236L;
	
	@TableId(value = "id",type = IdType.AUTO)
	private Integer id;
	private String username;
	private String phonenum;
	private String password;
	private Integer usertype;
	private Integer status;
	private Integer issuper;
	
	@TableField(exist = false)
	@Value("${com.lcpress.passwordslat}")
	private String passwordslat;
	
	
	public User(String username,  String password) {
		super();
		this.username = username;
		this.password = password;
		//String base = password +"/"+passwordslat;
		//String md5 = DigestUtils.md5DigestAsHex(base.getBytes());
		// 使用基本编码
        //String base64encodedString = Base64.getEncoder().encodeToString("runoob?java8".getBytes("utf-8"));
        //System.out.println("Base64 编码字符串 (基本) :" + base64encodedString);
        // 解码
        //byte[] base64decodedBytes = Base64.getDecoder().decode(base64encodedString);
        //System.out.println("原始字符串: " + new String(base64decodedBytes, "utf-8"));
	}
	
}
